/**
 * Drawer 组件的主题配置
 * 
 * 基于企业级设计规范 (Drawer.json) 的完整配置
 * 抽屉组件样式定义
 */

import type { ComponentToken } from 'antd/es/drawer/style';

// ========== 设计 Token 常量 ==========

/**
 * 层级相关 Token
 */
const Z_INDEX_TOKENS = {
  zIndexPopup: 1000,
} as const;

/**
 * 间距相关 Token
 */
const SPACING_TOKENS = {
  footerPaddingBlock: 8,
  footerPaddingInline: 16,
} as const;

/**
 * Drawer 完整主题配置
 */
export const drawerThemeConfig: Partial<ComponentToken> = {
  // ========== 层级配置 ==========
  zIndexPopup: Z_INDEX_TOKENS.zIndexPopup,

  // ========== 间距配置 ==========
  footerPaddingBlock: SPACING_TOKENS.footerPaddingBlock,
  footerPaddingInline: SPACING_TOKENS.footerPaddingInline,
};

export const getDrawerTheme = (
  customConfig?: Partial<ComponentToken>
): Partial<ComponentToken> => {
  return {
    ...drawerThemeConfig,
    ...customConfig,
  };
};

export type { ComponentToken as DrawerComponentToken } from 'antd/es/drawer/style';

